import React, { Component } from "react";
import {Route, NavLink} from 'react-router-dom';
import News from "../../pages/News/News";
import Message from '../../pages/Message/Message';
export default class Home extends Component {
    render() {
        return (
            <div className="panel">
                <div className="panel-body">
                    <h3>我是 Home 的内容</h3>
                    <div> 
                        <ul className="nav nav-tabs">
                            <li>
                                <NavLink className="list-group-item" to="/home/news">News</NavLink>
                            </li>
                            <li>
                                <NavLink className="list-group-item" to="/home/message">Message</NavLink>
                            </li>
                        </ul>
                        {/* 显示组件内容 */}
                        <Route path="/home/news" component={News} />
                        <Route path="/home/message" component={Message} />
                    </div>
                </div>
            </div>
        );
    }
}
